﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkyFab.Master" AutoEventWireup="true" CodeBehind="EditVendorInvoice.aspx.cs" Inherits="Web.EditVendorInvoice" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SubMenuPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<asp:Label ID="FlashMessageLabel" runat="server"></asp:Label>
    <table style="width:100%;">
        <tr>
            <td colspan="5">
                <h1>Edit Vendor Invoice<asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                </h1></td>
        </tr>
        <tr>
            <td>
                PO NO:<asp:ComboBox ID="PONoComboBox" runat="server" CssClass="WindowsStyle">
                </asp:ComboBox><asp:Button ID="SearchPONoButton" Text="Search" runat="server" 
                    onclick="SearchPONoButton_Click" />
            </td>
            <td colspan="4">
                Invoice No:<asp:TextBox ID="InvoiceNoTextBox" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="InvoiceNoTextBox" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Vendor:<asp:Label ID="VendorLabel" runat="server"></asp:Label>
            </td>
            <td colspan="4">
                Paid:
                <asp:CheckBox ID="PaidCheckBox" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                Date:<asp:TextBox ID="DateTextBox" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="DateTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="DateTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="DateTextBox" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            <td colspan="2" class="style2">
                &nbsp;</td>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style1">
                <h3>Insert Item:</h3></td>
            <td colspan="2" class="style3">
                </td>
            <td colspan="2" class="style1">
                </td>
        </tr>
        <tr>
            <td>
                PO Item &amp; Requested Date:<asp:DropDownList 
                    ID="POItemAndRequestedDateDropDownList" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="POItemAndRequestedDateDropDownList_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td colspan="2" class="style2">
                Batch No.:<asp:TextBox 
                    ID="BatchNoTextBox" runat="server"></asp:TextBox>
            </td>
            <td colspan="2" rowspan="2">
                <asp:Button ID="InsertButton" runat="server" Text="Insert" 
                    onclick="InsertButton_Click" />
            </td>
        </tr>
        <tr>
            <td>
                Quantity:<asp:TextBox ID="QuantityTextBox" runat="server" Height="19px" 
                    Width="45px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="QuantityTextBox" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="QuantityTextBox" ErrorMessage="*" ForeColor="Red" 
                    ValidationExpression="^[1-9]\d*$"></asp:RegularExpressionValidator>
            </td>
            <td colspan="2" class="style2">
                Unit Price:<asp:Label ID="UnitPriceLabel" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="5">
                <asp:GridView ID="InvoiceItemGridView" runat="server" CellPadding="4" 
                    GridLines="None" AutoGenerateColumns="False" CssClass="gridview" 
                    Width="100%">
                    <Columns>
                        <asp:BoundField DataField="ProductNo" HeaderText="No" />
                        <asp:BoundField DataField="ProductName" HeaderText="Name" />
                        <asp:BoundField DataField="Revision" HeaderText="Revision" />
                        <asp:BoundField DataField="Quantity" HeaderText="Quantity" />
                        <asp:TemplateField HeaderText="Delete">
                            <ItemTemplate>
                                <asp:Button ID="DeleteButton" runat="server" Text="Delete" 
                                    onclick="DeleteButton_Click" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    
                    
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="SuccessfulLabel" runat="server" ForeColor="Red"></asp:Label>
            </td>
            <td colspan="2">
                <asp:Button ID="UpdateVendorInvoiceButton" runat="server" 
                    Text="Update Vendor Invoice" onclick="UpdateVendorInvoiceButton_Click" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
